package com.xbongbong.pro.customerstatement.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.ConditionsEntityExt;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class StatementCustomerTotalDTO extends BaseDTO {
    private static final long serialVersionUID = 2584149482449172549L;
    /**
     * 表单id
     * 注：该值需传客户的formId，不是对账单的
     */
    @NotNull(message = "{dto.msg.formId.NotNull}")
    private Long formId;

    /**
     * 菜单id
     * 注：该值需传客户的menuId，不是对账单的，过滤客户列表数据权限时需要用到
     */
    @NotNull(message = "{dto.msg.menuId.NotNull}")
    private Long menuId;

    /**
     * saas标记
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer saasMark;

    /**
     * 客户名称或客户电话搜索
     */
    private String nameLike;

    /**
     * 对账日期范围筛选：[1601481600, 1603555199]
     */
    @NotNull(message = "{dto.msg.statementCustomerList.checkingDate.NotEmpty}")
    @NotEmpty(message = "{dto.msg.statementCustomerList.checkingDate.NotEmpty}")
    @Getter(onMethod_ = {@QueryIgnore})
    private List<Long> checkingDate;

    /**
     * 搜索条件，如客户id
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<ConditionsEntityExt> conditions = new ArrayList<>();

    /**
     * 特殊列表筛选
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private JSONObject commonFilter;
}
